<template>
	<view class="show-container">
		<!-- <u-button>返回</u-button> -->
		<!-- <img src="../../static/png/bgc.jpeg" style="width: 100%;height: 100%;"> -->
		<view class="show-image-container">
			<view class="show-image-bgc-container">
				<img src="https://bk-web-1309566229.cos.ap-guangzhou.myqcloud.com/bgc-color.jpg" class="show-image">
			</view>
<!-- 			<view class="show-title-container">
				<view class="show-title-container-up">明明白白做人 清清楚楚记账</view>
				<view class="show-title-container-down">明明白白做人 清清楚楚记账</view>
			</view> -->
			<view class="show-count-backwards-container">倒计<span class="show-count-backwards-content-bold">{{time}}</span>秒</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {goBack} from '../../util/util.js';
	export default {
		data() {
			return {
				time: 6,												// 倒计时
			}
		},
		onLoad() {
			
		},
		onReady() {
			
		},
		methods: {
			back() {
				goBack();
			}
		},
		mounted() {
			var that = this;
			let clock = setInterval(function() {
				if (--that.time == 0) {
					clearInterval(clock)
				}
				console.log(that.time, "测试")
			}, 1000);
		},
	}
</script>

<style lang="scss">
	/* 设置背景颜色 */
	page {
		padding-top: var(--status-bar-height);
		background-color: $themeColor;
		box-sizing: border-box;
		width: 100vw;
		height: 100vh;
	}
	
	.show-container {
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		// background-color: $themePurpleColor;
		display: flex;
		justify-content: center;
		align-items: flex-start;
		
		.show-image-container {
			width: 100%;
			height: 100%;
			display: flex;
			flex-direction: column;
			justify-content: flex-end;
			align-items: center;
			position: relative;
			
			.show-image-bgc-container {
				width: 100%;
				height: 100%;
				display: flex;
				justify-content: center;
				align-items: flex-end;
				
				.show-image {
					width: 100%;
					height: 100%;
				}
			}
			
			.show-title-container {
				position: absolute;
				width: 100%;
				height: 30%;
				bottom: 100rpx;
				left: 0rpx;
				display: flex;
				flex-direction: column;
				color: $themePurpleColor;
				font-size: 35rpx;
				font-weight: bold;
				
				.show-title-container-up {
					width: 100%;
					height: 50%;
					display: flex;
					justify-content: center;
					align-items: flex-end;
					padding-bottom: 20rpx;
				}
				
				.show-title-container-down {
					width: 100%;
					height: 50%;
					display: flex;
					justify-content: center;
					align-items: flex-end;
					transform: rotateX(180deg); /* 垂直镜像翻转 */
					opacity: 0.4;
					padding-top: 20rpx;
				}
			}
			
			.show-count-backwards-container {
				position: absolute;
				right: 30rpx;
				top: 30rpx;
				width: 180rpx;
				height: 60rpx;
				padding: 10rpx;	
				display: flex;
				justify-content: center;
				align-items: center;
				box-sizing: border-box;
				border-radius: 20rpx;
				background-color: $themeBgcLightGreyColor;
				color: $themePurpleColor;
				
				// .show-count-backwards-content {
				// 	width: 100%;
				// 	height: 100%;
				// 	display: flex;
				// 	justify-content: center;
				// 	align-items: center;
					
					.show-count-backwards-content-bold {
						font-weight: bold;
						margin-left: 10rpx;
						margin-right: 10rpx;
					}
				// }
			}
		}
	}
</style>
